from django.db import models
from django.db.models import Count
from article.models import articles as art_model


# Create your models here.

class category(models.Model):
    id = models.AutoField(primary_key=True, db_index=True)
    category_name = models.CharField(max_length=255, db_index=True)
    avatar = models.CharField(max_length=255, null=True)    #图标路径
    description = models.CharField(max_length=1024, null=True)
    create_time = models.DateTimeField(auto_now_add=True)
    update_time = models.DateTimeField(auto_now=True)

    class Meta:
        db_table = 'mblog_category'

